package demo2;


class Car {
    //这个类是不能独立存在的 存在没有意义
    class Engine {

    }
}
interface IA {
    void func();
}

public class Test {
    public static void main(String[] args) {
        new IA() {

            @Override
            public void func() {
                System.out.println("dadada");
            }
        }.func();
    }
    public static void main1(String[] args) {
        Car car = new Car();
        Car.Engine engine = car.new Engine();
    }
}
